package tkaczyk.simtalk.pc;

import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class SimTalkPC {
	static {
		DOMConfigurator.configure("conf/log4j.xml");
	}
	private final static Logger log = Logger.getRootLogger();

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		final MainFrame mainFrame = (MainFrame) context.getBean("mainFrame");
		
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				try {
					mainFrame.CreateAndShow();
				} catch (Exception e) {
					log.error(e);
				}
			}
		});
	}
}
